import { ref, computed } from 'vue'

export default function () {
    //数据
    let sum = ref(0)

    //方法 
    function add() {
        sum.value += 1
    }
    // console.log(1)

    let sumAdd = computed(() => {
        return sum.value + 1
    })

    return { sum, add, sumAdd }
}